/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.project.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.systemconfig.entity.ProjectBaseEntity;
import io.renren.modules.systemconfig.entity.SystemConfigServersEntity;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 系统用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Data
@TableName("frontend")
public class FrontendEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 用户ID
	 */
	@TableId
	private Long id;

	/**
	 * 用户名
	 */
	@NotBlank(message="名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String name;

	private long projectId;
	@TableField(exist = false)
	private String projectName;


	private String accessAddress;
	private String codeAddress;
	private String framework;
	private int status;
	private String createTime;
	private Long serverId;
	private String deployPath;
	private String nginxBasePath;
	private String nginxConfigPath;
	private String nginxConfigName;
	@TableField(exist = false)
	private ProjectBaseEntity project;
	@TableField(exist = false)
	private SystemConfigServersEntity server;

	@TableField(exist = false)
	private String runtimeStatus;
}
